
let defaultOwner = {firstName: 'Martin', lastName: 'Fowler'};

export class PrintOwner {

	constructor(console) {
		this._console = console;
	}

	printOwner() {
		const defaultUser = defaultOwner;
		this._console.log(`defaultOwner: firstName: ${defaultUser.firstName},lastName:${defaultUser.lastName}`);
		defaultOwner = {firstName: 'Mike', lastName: 'Jackson'};
		const anotherDefaultUser = defaultOwner;
		this._console.log(`updated anotherDefaultUser: firstName: ${anotherDefaultUser.firstName},lastName:${anotherDefaultUser.lastName}`);
		// const otherDefaultUser = defaultOwner;
		// otherDefaultUser.firstName = 'Jack';
		const newDefaultUser = defaultOwner;
		this._console.log(`newDefaultUser: firstName: ${newDefaultUser.firstName},lastName:${newDefaultUser.lastName}`);
	}

}
